import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const task: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "任务管理",
			key: "task"
		},
		children: [
			{
				path: "/task/list",
				element: lazyLoad(React.lazy(() => import("@/pages/task/Task/index"))),
				meta: {
					title: "任务列表",
					requiresAuth: true,
					key: "/task/list",
					icon: ""
				}
			},
			{
				path: "/task/list/add",
				element: lazyLoad(React.lazy(() => import("@/pages/task/Add/index"))),
				meta: {
					title: "创建任务",
					requiresAuth: true,
					key: "/task/list/add",
					icon: ""
				}
			},
			{
				path: "/task/list/detail",
				element: lazyLoad(React.lazy(() => import("@/pages/task/Detail/index"))),
				meta: {
					title: "任务详情",
					requiresAuth: true,
					key: "/task/list/detail",
					icon: ""
				}
			},
		]
	}
];

export default task;
